﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Eatime.Entitys
{
    public class ShopReview : INotifyPropertyChanged
    {
        private  string _userNick = string.Empty;
        public string UserNick
        {
            get { return _userNick; }
            set { _userNick = value; }
        }
        private int _shopReviewId = 0;
        public int ShopReviewId
        {
            get
            {
                return _shopReviewId;
            }
            set
            {
                if (value != _shopReviewId)
                {
                    _shopReviewId = value;
                    NotifyPropertyChanged("ShopReviewId");
                }
            }
        }

        private DateTime _created = DateTime.Now;
        public DateTime Created
        {
            get
            {
                return _created;
            }
            set
            {
                if (value != _created)
                {
                    _created = value;
                    NotifyPropertyChanged("Created");
                }
            }
        }

        private DateTime _updated = DateTime.Now;
        public DateTime Updated
        {
            get
            {
                return _updated;
            }
            set
            {
                if (value != _updated)
                {
                    _updated = value;
                    NotifyPropertyChanged("Updated");
                }
            }
        }

        private string _reviewContent;
        public string ReviewContent
        {
            get
            {
                return _reviewContent;
            }
            set
            {
                if (value != _reviewContent)
                {
                    _reviewContent = value;
                    NotifyPropertyChanged("ReviewContent");
                }
            }
        }

        private int _deliverSpeed = 0;
        public int DeliverSpeed
        {
            get
            {
                return _deliverSpeed;
            }
            set
            {
                if (value != _deliverSpeed)
                {
                    _deliverSpeed = value;
                    NotifyPropertyChanged("DeliverSpeed");
                }
            }
        }

        private int _taste = 0;
        public int Taste
        {
            get
            {
                return _taste;
            }
            set
            {
                if (value != _taste)
                {
                    _taste = value;
                    NotifyPropertyChanged("Taste");
                }
            }
        }

        private int _shopId = 0;
        public int ShopId
        {
            get
            {
                return _shopId;
            }
            set
            {
                if (value != _shopId)
                {
                    _shopId = value;
                    NotifyPropertyChanged("ShopId");
                }
            }
        }

        private int _qos = 0;
        /// <summary>
        /// quality of service
        /// </summary>
        public int QoS
        {
            get
            {
                return _qos;
            }
            set
            {
                if (value != _qos)
                {
                    _qos = value;
                    NotifyPropertyChanged("QoS");
                }
            }
        }

        private string _deviceUniqueId;
        public string DeviceUniqueId
        {
            get { return _deviceUniqueId; }
            set
            {
                if (value != _deviceUniqueId)
                {
                    _deviceUniqueId = value;
                    NotifyPropertyChanged("DeviceUniqueId");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(string info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
    }
}
